package com.etc.delivery.dao.appoint;

import com.etc.delivery.entity.Address;
import com.etc.delivery.entity.Appointment;
import com.etc.delivery.entity.Waybill;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IAppointmentDao {

    /**
     * 发布预约
     *
     * @param appoin
     * @return
     */
    public boolean appoint(Appointment appoin);

    /**
     * 查看全部订单
     *
     * @return
     */
    public List<Appointment> showAllAppoint();

    /**
     * 根据手机号查看订单
     *
     * @return
     */
    public List<Appointment> showAllAppointByPhone(String phone);

    /**
     * 根据寄件类别生成金额
     *
     * @param typeId
     * @return
     */
    public double queryMoneyByType(int typeId);

    /**
     * 批量寄件
     *
     * @param waybill
     * @return
     */
    public boolean add(List<Waybill> waybill);

    /**
     * 取消订单
     *
     * @param waybill_no
     * @return
     */
    public boolean deleteAppoin(int waybill_no);

    /**
     * 点单编号查询订单
     *
     * @param waybill_no
     * @return
     */
    public Appointment queryAppointByNo(@Param("waybill_no") int waybill_no);

    public List<Address> queryProvince();

    public List<Address> queryCity(Integer id);

}
